Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quick fix to allow const generic args in derive_component! macro #16

Merged
merged 4 commits into from
Jan 11, 2024

Conversation

soareschen
Copy link
Collaborator

A component with consumer trait containing const generic argument should work. Such as:

#[derive_component(FooComponent, FooProvider<Context>)]
pub trait HasFoo<const BAR: usize> {
    type Foo;

    fn foo(&self) -> Self::Foo;
}

Note that this PR leaves the support for lifetime generic argument unimplemented for now.

@soareschen soareschen merged commit 9c323af into main Jan 11, 2024
4 checks passed
@soareschen soareschen deleted the soares/const-generic-argument branch January 11, 2024 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant